<%-- 
    Document   : modify
    Created on : Mar 17, 2012, 3:17:24 AM
    Author     : Allen
--%>

<%-- Header Area --%>
<%@ include file="/template/header.jsp" %> 
<%-- End of Header Area --%>


<%-- Content Area --%>
<h2>Update Categories</h2> 
<div class="submenu">
    <ul>
        <li><a href="/manage">Manage</a></li>
    </ul>
    <div class="clear"></div>
</div>
<% if (category != null) {%>

<form action="" method="post">  
    <input type="hidden" name="id" value="<%= request.getAttribute("id")%>" />

    <table class="generic-vertical-table">
        <tr>
            <td>Category Name: </td>
            <td><input type="text" name="name" validate="form" require="<b>Required Field Missing</b><br/>Please enter the category's name." value="<%= category.getName()%>"/></td>
        </tr>

        <tr>
            <td>Active: </td>
            <td><select name="active" value="<%= category.isActive()%>">
                    <% if (category.isActive() == true) {%>
                    <option value="<%= category.isActive()%>">True</option>
                    <option value="false">False</option>

                    <% } else {%>
                    <option value="<%= category.isActive()%>">False</option>
                    <option value="true">True</option>
                    <% }%>
                </select></td>
        </tr>

        <tr>
            <td colspan="2" align="right">
                <input type="submit" name="modify" value="Modify" onClick="return validate('form')"/>
                <input type="button" value="Reset" onclick="reload()" />
            </td>

        </tr>


    </table>
</form>
<%}%>
</body>
</html>
<%-- Footer Area --%>
<%@ include file="/template/footer.jsp" %>
<%-- End of Footer Area --%>